//
//  UIBarButtonItem-Extension.swift
//  weibo
//
//  Created by wang_h on 2017/5/26.
//  Copyright © 2017年 wang_h. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    /*
    convenience init(imageName : String) {
        self.init()
        let btn = UIButton()
        btn.setImage(UIImage(named : imageName), for: .normal)
        btn.setImage(UIImage(named : imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        self.customView = btn
    }
 */
    convenience init(imageName : String) {
        let btn = UIButton()
        btn.setImage(UIImage(named : imageName), for: .normal)
        btn.setImage(UIImage(named : imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        self.init(customView: btn)
    }
}
